<template>
    <el-popconfirm
        confirm-button-text="确定"
        cancel-button-text="取消"
        :icon="Delete"
        title="确定要删除吗？"
        width="200"
        :hide-after="0"
        @confirm="props.confirm"
    >
        <template #reference>
            <el-button type="danger" plain>删除</el-button>
        </template>
    </el-popconfirm>
</template>

<script setup>
import { ref } from "vue";
import { Delete } from "@element-plus/icons-vue";

const props = defineProps({
    confirm: {
        type: Function,
        default: () => {},
        required: true
    }
});
</script>

<style lang="scss" scoped></style>
